<!DOCTYPE html> 
<html lang="en"> 
<head> 
    <meta charset="utf-8"> 
    <meta name="viewport" content="width=device-width, initial-scale=1"> 
    <title>新增查询条件</title> 

    <style type="text/css">
        @import url("/pages/import/base.css");
        html, body{ margin:0; height:100%; }
    </style>
    <script type="text/javascript" src="/pages/import/base.js"></script>
    
<style type="text/css">
    html, body{ margin:0; height:100%;width: 100%;overflow: auto;}
</style>



<body>
   <table class="editTable" style="text-align: center;" >
        <tr>
            <td class="label">id</td>
            <td >
                <input id='id' class="easyui-textbox" data-options="required:false,width:200,editable:true">
            </td>
            <td class="label">class</td>
            <td >
                <select id='clazz' class="easyui-combobox" data-options="required:false,width:200,editable:true">
                    <option value="easyui-combobox">easyui-combobox</option>                        
                    <option value='easyui-textbox'>easyui-textbox</option>  
                    <option value='easyui-combotree'>easyui-combotree</option>  
                    <option value='easyui-datebox'>easyui-datebox</option>  
                    <option value='easyui-datetimebox'>easyui-datetimebox</option>                      
                </select>     
            </td>            
        </tr>
        <tr>
            <td class="label">editable</td>
            <td >
                <select id='editable' class="easyui-combobox" data-options="required:false,width:200,editable:true">
                    <option value="false">false</option>                        
                    <option value='true'>true</option>  
                </select>       
            </td>
            <td class="label">prompt</td>
            <td >
                <input id='prompt' class="easyui-textbox" data-options="required:false,width:200,editable:true">
            </td>            
        </tr>        
        <tr>        
            <td class="label">hidden</td>
            <td >
                <select id='hidden' class="easyui-combobox" data-options="required:false,width:200,editable:true">
                    <option value="false">false</option>                        
                    <option value='true'>true</option>  
                </select>                  
            </td>
        </tr>    
                    
        <tr style="margin-top: 200px">
            <td>
            </td>
            <td>
            </td>
            <td>
            </td>
            <td  style="text-align: right;margin-top: 100px">
                  <a href="javascript:void(0)" class="easyui-linkbutton" data-options="iconCls:'fa fa-save',plain:true" onclick="save()" style="color:black;width:80px;height:auto;background-color: #00CD66">确定</a>
            </td>               
        </tr>          
    </table>
    
</body> 
</html>
<script type="text/javascript"> 

function save()
{
    parent.$('#dg_search').datagrid('appendRow',{
        uuid: '',
        id: $('#id').textbox('getValue'),
        clazz: $('#clazz').combobox('getValue'),      
        editable: $('#editable').combobox('getValue'),        
        prompt: $('#prompt').textbox('getValue'),
        hidden: $('#hidden').combobox('getValue')
    });
    parent.$('#dg_search').datagrid('autoSizeColumn');
    var index = parent.layer.getFrameIndex(window.name); //先得到当前iframe层的索引
    parent.layer.close(index); //再执行关闭
}


</script>